home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Publishing / ImagePortfolio / Source / Portfolio.h < prev    next >
Text File  |  1994-04-01  |  3KB  |  102 lines

  1. // -------------------------------------------------------------------------------------
  2. // Portfolio.h
  3. // -------------------------------------------------------------------------------------
  4. #import <mach/cthreads.h>
  5. #import <objc/Object.h>
  6.  
  7. // -------------------------------------------------------------------------------------
  8. // file name linked list
  9. typedef struct fileLIST_s {
  10.     char                *list;
  11.     int                    flags;
  12.     struct fileLIST_s    *next;
  13. } fileLIST;
  14.  
  15. // -------------------------------------------------------------------------------------
  16. @interface Portfolio : Object
  17. {
  18.  
  19.     char        *sourceFile;                // source file name
  20.     BOOL        abortLoad;                    // abort/flush file loading
  21.     BOOL        allowDrop;                    // register for file drop from Workspace Manager
  22.     BOOL        isActivePortfolio;            // active portfolio
  23.     id            fileIcon;                    // file representation icon
  24.   
  25.     mutex_t        loadMutex;                    // load list lock
  26.     fileLIST    *loadList;                    // end of file name linked list
  27.  
  28.     id            paletteWindow;                // icon Palette panel
  29.     NXSize        minWindowSize;                // minimum window size for current cell size
  30.     NXSize        minCellSize;                // minimum cell size
  31.     NXSize        windowOverhead;                // delta size between window and contentView
  32.     BOOL        isRegistered;                // true if window is registered for dragging
  33.  
  34.     id            largePanel;                    // expanded view panel
  35.     id            largeView;                    // expanded custom view
  36.     id            largeScroller;                // expanded view scroller
  37.   
  38.     id            paletteScroll;                // icon Palette scroller
  39.     id            iconButtonId;                // workspace icon view button
  40.     id            iconBoxId;                    // icon view button box
  41.     id            iconPathId;                    // image path name outlet
  42.     id            iconSizeId;                    // image size outlet
  43.     id            iconColors;                    // image colors outlet
  44.     id            iconMatrix;                    // icon Palette matrix
  45.  
  46.     id            windowHeader;                // image infor header box
  47.     NXSize        headerSize;                    // size of window header
  48.   
  49. }
  50.  
  51. // -------------------------------------------------------------------------------------
  52.  
  53. // instance initialization
  54. - init;
  55. - initFromFile:(const char*)fileName;
  56. - initFromFile:(const char*)fileName registerWindow:(BOOL)regWindow;
  57. + firstInstance;
  58.  
  59. // active portfolio
  60. - becomeActivePortfolio:sender;
  61. - resignActivePortfolio:sender;
  62. - (BOOL)isActivePortfolio;
  63. + makeActivePortfolio:(Portfolio*)portObj;
  64. + activePortfolio;
  65.  
  66. // button/menu actions
  67. - show:sender;
  68. - open:sender;
  69. - save:sender;
  70. - saveAs:sender;
  71. - saveDefaults:sender;
  72.  
  73. // document status methods
  74. + (BOOL)isDocEdited;
  75. - (BOOL)isDocEdited;
  76. - (BOOL)isLoading;
  77.  
  78. // font methods
  79. - font;
  80. - setFont:fontObj;
  81.  
  82. // non-scaled image view methods
  83. - showLargeImage:sender;
  84. - showImage:imageId title:(char*)title;
  85.  
  86. // window size constraints
  87. - getWindowSize:(NXSize*)windowSize forCellSize:(NXSize*)cellSize gap:(NXSize*)gapSize
  88.         rows:(int)rows cols:(int)cols;
  89. - getDisplayedRows:(int*)rows cols:(int*)cols;
  90. - (NXSize*)cellSize;
  91.     
  92. // PaletteCell delegate methods
  93. - loadFileList:(const char*)fileList :(BOOL)openDoc :(BOOL)chkExtn;
  94. - cellBecameSelected:imageCell;
  95. - cellResignedSelected:imageCell;
  96.  
  97. // icon dragging delegate support
  98. - _registerWindow;
  99. - _unregisterWindow;
  100.  
  101. @end
  102.